﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SH_VBoxVM_Service.Classes
{
    /// <summary>
    /// This class represents a single Virtual Machine instance
    /// It will store all its properties that has been assigned from configuration file.
    /// This way, I just need to read the file once per Host Startup.
    /// And At host reboot or shutdown, the configuration file will be rewritten from this data.
    /// ----
    /// Warning: For the moment all its working fine without the class.
    /// This might be used though to determine if the user needs the VM to be started as Headless or GUI.
    /// It will require a minor change to the Config Window and Config File.
    /// </summary>
    class VirtualMachine
    {

        public string VmName { get; set; }
        public string Type{ get; set; }
        public bool AutoStart { get; set; }

        /// <summary>
        /// There should be no construction of a VM without a name.
        /// </summary>
        private VirtualMachine() {
        }

        /// <summary>
        /// I am assuming this is the default configuration 
        /// since its looking for the use of this service software.
        /// </summary>
        /// <param name="vmname"></param>
        public VirtualMachine(string vmname)
        {
            VmName = vmname;
            Type = "headless";
            AutoStart = true;
        }

        /// <summary>
        /// Sets everything from the Config file.
        /// </summary>
        /// <param name="vmname"></param>
        public VirtualMachine(string vmname,string type, bool autostart)
        {
            VmName = vmname;
            Type = type;
            AutoStart = autostart;
        }



    }
}
